import http from '../../utils/http/request'

// 根据ID查询新闻播报
export function getDeviceIdList(data) {
    return http({
        url: '/sys/device/info/{id}',
        method: 'GET',
        data
    })
}

// 发布公告
export function getDeviceRelease(id,status) {
    return http.get('/sys/device/release/'+id+'/'+status)
}

//获取考勤数据来源
export function getDbList(data) {
    return http({
        url: '/sys/device/getdb',
        method: 'POST',
        data
    })
}


//获取单位
export function getOrgList(data) {
    return http({
        url: '/sys/device/getOrg',
        method: 'POST',
        data
    })
}



//获取新闻数据
export function getDeviceList(data) {
    return http({
        url: '/sys/device/list',
        method: 'POST',
        data
    })
}

//新增新闻数据
export function addDevice(data) {
    return http({
        url: '/sys/device/save',
        method: 'POST',
        data
    })
}
//更新新闻数据
export function updateDevice(data) {
    return http({
        url: '/sys/device/update',
        method: 'POST',
         data
    })
}

//删除新闻数据
export function delDevice(data) {
    return http({
        url: '/sys/device/delete',
        method: 'GET',
        params: data
    })
}

//上传新闻图片
// export function uploadImage(data) {
//     return http({
//         url: '/sys/rotation/uploadImage',
//         method: 'POST',
//         params: data
//     })
// }
